<?
class ztime extends Think {

	static function line2time($val = '') {
		if ($val == '') {
			$val = time ();
		}
		return date ( 'Y-m-d H:i:s', $val );
	}

	static function date2line($val) {
		$d = explode ( '-', $val );
		return mktime ( 0, 0, 0, $d [1], $d [2], $d [0] );
	}

	static function datetime2line($val) {
		$t = explode ( ' ', $val );
		$d = explode ( '-', $t [0] );
		$t = explode ( ':', $t [1] );
		return mktime ( $t [0], $t [1], $t [2], $d [1], $d [2], $d [0] );
	}
}
?>